html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

:root {
  --primary-color: #fff;
  --secondary-color: #000;
  --primary-font: "Poppins", sans-serif;
}

body {
  background-image: url(../assets/wallpapers/1.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
  font-family: var(--primary-font);
  text-align: center;
  color: var(--primary-color);
}

body::-webkit-scrollbar {
  width: 0.5rem;
}

body::-webkit-scrollbar-track {
  background-color: var(--primary-color);
}

body::-webkit-scrollbar-thumb {
  background-color: #000;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.main {
  padding-top: 45px;
}

.title {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.form {
  display: grid;
  grid-template-columns: 1fr 3.25rem;
  grid-template-rows: 3rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}

.form__input {
  position: relative;
  background-color: var(--primary-color);
  width: 100%;
  padding: 1.15rem;
  font-size: 1rem;
  font-family: var(--primary-font);
  border: 3px solid var(--primary-color);
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
  transition: font-size 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.form__input:placeholder-shown {
  font-size: 0.9rem;
}


.form__input:focus{
  border-color: var(--secondary-color);
  outline: none;
}

.form__input::-webkit-search-cancel-button {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 10000;
  appearance: none;
  width: 1rem;
  height: 1rem;
  background-color: var(--secondary-color);
  clip-path: polygon(
    20% 4%,
    5% 14%,
    35% 46%,
    1% 76%,
    16% 91%,
    50% 60%,
    81% 91%,
    96% 81%,
    61% 48%,
    90% 13%,
    76% 3%,
    49% 35%
  );
  margin-right: 1rem;
  transform: translateY(-50%);
  cursor: pointer;
}

.form__button {
  background-color: var(--secondary-color);
  padding: 0.9rem;
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.news {
  position: absolute;
  top: calc(100vh - 80px);
  left: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.35) 3rem
  );
  width: 100%;
  padding: 1rem;
}

.news__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  width: max-content;
  font-weight: normal;
  padding: 0.25rem 1rem;
  margin-top: 0;
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.5rem;
}

.news__title::after {
  display: inline-block;
  content: "";
  background-image: url(../assets/icons/newspaper.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 2rem;
  height: 2rem;
}

.news__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 850px;
  padding-left: 0;
  margin-left: auto;
  margin-right: auto;
  list-style: none;
}

.new {
  position: relative;
  text-align: start;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
}

@media (hover: hover) {
  .new {
    transition: transform 0.25s;
  }

  .new:hover {
    transform: scale(1.05);
  }
}

.new__content {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem;
}

@media screen and (min-width: 768px) {
  .new__content {
    position: absolute;
    background-color: transparent;
    background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 0.9)
    );
    transform: translateY(-100%);
  }
}

.new__title {
  font-size: min(1.25rem, 7vw);
  margin-top: 0;
  margin-bottom: 0.5rem;
}
